/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TelaCliente.java
 *
 * Created on 08/04/2010, 20:51:38
 */

package br.com.pi.SmartFast.view;

//importações
import javax.swing.JFrame;
import br.com.pi.SmartFast.controler.ControleTelaCardapio;
import br.com.pi.SmartFast.controler.ControleTelaCliente;

public class TelaCliente extends javax.swing.JFrame {

    public static int opcao=0;

    ControleTelaCardapio contcliente = new ControleTelaCardapio();
    ControleTelaCliente tecli = new ControleTelaCliente();
    /** Creates new form TelaCliente */
    public TelaCliente() {
        initComponents();
        setExtendedState(JFrame.MAXIMIZED_BOTH);//Abrir tela no tamanho máximo da resolução
        //setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); //Impede de fechar a tela
    }


    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        botaoRefeicoes = new javax.swing.JButton();
        botaoBebidas = new javax.swing.JButton();
        botaoSobremesas = new javax.swing.JButton();
        botaoPedidos = new javax.swing.JButton();
        botaoFecharConta = new javax.swing.JButton();
        botaoGarcon = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setBounds(new java.awt.Rectangle(0, 0, 1024, 768));
        setMinimumSize(new java.awt.Dimension(1024, 768));
        setResizable(false);
        setUndecorated(true);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        botaoRefeicoes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgRefeicoes.png"))); // NOI18N
        botaoRefeicoes.setBorder(null);
        botaoRefeicoes.setBorderPainted(false);
        botaoRefeicoes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoRefeicoesActionPerformed(evt);
            }
        });

        botaoBebidas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgBebidas.png"))); // NOI18N
        botaoBebidas.setBorder(null);
        botaoBebidas.setBorderPainted(false);
        botaoBebidas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoBebidasActionPerformed(evt);
            }
        });

        botaoSobremesas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgSobremesas.png"))); // NOI18N
        botaoSobremesas.setBorder(null);
        botaoSobremesas.setBorderPainted(false);
        botaoSobremesas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoSobremesasActionPerformed(evt);
            }
        });

        botaoPedidos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgPedidos.png"))); // NOI18N
        botaoPedidos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoPedidosActionPerformed(evt);
            }
        });

        botaoFecharConta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgFecharConta.png"))); // NOI18N
        botaoFecharConta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoFecharContaActionPerformed(evt);
            }
        });

        botaoGarcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgGarcon.png"))); // NOI18N
        botaoGarcon.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoGarconActionPerformed(evt);
            }
        });

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/propagandaBebidas.png"))); // NOI18N

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/propagandaDiversas.png"))); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGap(72, 72, 72)
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(360, 360, 360)
                .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 444, Short.MAX_VALUE)
                .addGap(66, 66, 66))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2))
                .addGap(85, 85, 85))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(61, 61, 61)
                .addComponent(botaoPedidos, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)
                .addGap(288, 288, 288)
                .addComponent(botaoFecharConta, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)
                .addGap(215, 215, 215)
                .addComponent(botaoGarcon, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)
                .addGap(78, 78, 78))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(botaoRefeicoes, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
                .addGap(144, 144, 144)
                .addComponent(botaoBebidas, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
                .addGap(127, 127, 127)
                .addComponent(botaoSobremesas, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
                .addGap(31, 31, 31))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(botaoRefeicoes, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 130, Short.MAX_VALUE)
                    .addComponent(botaoBebidas, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 130, Short.MAX_VALUE)
                    .addComponent(botaoSobremesas, javax.swing.GroupLayout.PREFERRED_SIZE, 130, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(botaoGarcon, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                            .addComponent(botaoPedidos, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(19, 19, 19))
                        .addComponent(botaoFecharConta, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(27, 27, 27))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botaoFecharContaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoFecharContaActionPerformed

        tecli.botaoFecharContaAoClicar();
        
    }//GEN-LAST:event_botaoFecharContaActionPerformed

    private void botaoGarconActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoGarconActionPerformed
     contcliente.ajudaGarcom();
    }//GEN-LAST:event_botaoGarconActionPerformed

    private void botaoPedidosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoPedidosActionPerformed
       new TelaPedidos().setVisible(true);
    }//GEN-LAST:event_botaoPedidosActionPerformed

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened

        this.setExtendedState(JFrame.MAXIMIZED_BOTH);
        
    }//GEN-LAST:event_formWindowOpened

    private void botaoRefeicoesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoRefeicoesActionPerformed
        new TelaBebidas().setVisible(true);
        opcao = 1;
    }//GEN-LAST:event_botaoRefeicoesActionPerformed

    private void botaoBebidasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoBebidasActionPerformed
         new TelaBebidas().setVisible(true);
        opcao = 3;
    }//GEN-LAST:event_botaoBebidasActionPerformed

    private void botaoSobremesasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoSobremesasActionPerformed
         new TelaBebidas().setVisible(true);
          opcao = 2;
    }//GEN-LAST:event_botaoSobremesasActionPerformed


//    public static void main(String args[]) {
//        java.awt.EventQueue.invokeLater(new Runnable() {
//            public void run() {
//                new TelaCliente().setVisible(true);
//            }
//        });
//    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botaoBebidas;
    private javax.swing.JButton botaoFecharConta;
    private javax.swing.JButton botaoGarcon;
    private javax.swing.JButton botaoPedidos;
    private javax.swing.JButton botaoRefeicoes;
    private javax.swing.JButton botaoSobremesas;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables

}
